<template>
  <el-card>
    <div class="card">
      <img :src="userStore.avatar" alt="" class="avatar" />
      <div class="text">
        <h1 class="welcome1">
          {{ `Hello, ${userStore.userName}${getTime()}好` }}
        </h1>
        <p class="welcome2">硅谷甄选欢迎你</p>
      </div>
    </div>
  </el-card>
</template>

<script setup lang="ts">
  import useUserStore from '@/store/modules/user'
  import { getTime } from '@/utils/time'
  let userStore = useUserStore()
</script>

<style scoped lang="scss">
  .card {
    height: 200px;
    display: flex;
    align-items: center;
    .avatar {
      height: 80%;
      border-radius: 50%;
      width: auto;
    }
    .text {
      height: 80%;
      width: 500px;
      position: relative;
      .welcome1 {
        position: absolute;
        top: 10%;
        left: 10%;
      }
      .welcome2 {
        position: absolute;
        bottom: 10%;
        left: 10%;
        font-style: italic;
        font-size: 18px;
        color: skyblue;
      }
    }
  }
</style>
